import request from '@/utils/request'
import request2 from '@/utils/request2'

export function login(data) {
  return request({
    method: 'POST',
    url: '/login',
    data: data
  })
}

export function getInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: {token}
  })
}

export function getStuInfo(data) {
  return request({
    url: '/user/stu',
    method: 'GET',
    params: data
  })
}

export function getTeachInfo(data) {
  return request({
    url: '/user/teacher',
    method: 'GET',
    params: data
  })
}

export function getMute(data) {
  return request({
    url: '/user/mute',
    method: 'GET',
    params: {
      user_id: data
    }
  })
}

export function addAndupdateMute(data) {
  return request({
    url: '/user/mute',
    method: 'POST',
    data: data
  })
}

export function generateCaptcha() {
  return request({
    url: '/getImageCode',
    method: 'get'
  })
}
